package com.lzy.product.apis.impl;

import com.lzy.product.apis.AgentProtocolProductServiceApi;
import com.lzy.product.dtos.agent.AgentProtocolProductDto;
import com.lzy.product.service.AgentProtocolProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by WIN7 on 2018/04/14.
 */
@Service
public class AgentProtocolProductServiceApiImpl implements AgentProtocolProductServiceApi {

    @Autowired
    AgentProtocolProductService agentProtocolProductService;

    @Override
    public Long insert(AgentProtocolProductDto dto) {
        return agentProtocolProductService.insert(dto);
    }

    @Override
    public Boolean update(AgentProtocolProductDto dto) {
        return agentProtocolProductService.update(dto);
    }

    @Override
    public Boolean delete(Long id) {
        return agentProtocolProductService.delete(id);
    }

    @Override
    public Boolean remove(Long id) {
        return agentProtocolProductService.remove(id);
    }

    @Override
    public AgentProtocolProductDto findById(Long id) {
        return agentProtocolProductService.findById(id);
    }

    @Override
    public List<AgentProtocolProductDto> query(AgentProtocolProductDto dto) {
        return agentProtocolProductService.query(dto);
    }

    @Override
    public List<AgentProtocolProductDto> selectByProtocolId(Long protocolId) {
        return agentProtocolProductService.selectByProtocolId(protocolId);
    }

    @Override
    public List<AgentProtocolProductDto> selectByProductId(Long productId) {
        return agentProtocolProductService.selectByProductId(productId);
    }

    @Override
    public Boolean deleteByProtocolId(Long protocolId) {
        return agentProtocolProductService.deleteByProtocolId(protocolId);
    }
}
